import axios from './axios'

let base = 'http://localhost:8000';

export function post (url, data) {
    let formdata = new FormData();
    for(let item in data) {
        formdata.append(item, data[item]);
    }
    return axios({
        url: base + url,
        method: 'post',
        data: formdata
    })
}

const util = {
    post
}

export default util